import request from "@/plugins/axios";
// 登录
export function loginApi(data) {
  return request({
    url: "/admin/login/index",
    method: "post",
    data,
  });
}
// 用户信息
export function userApi() {
  return request({
    url: "/admin/user/userinfo",
  });
}
// 设置公司名
export function configApi() {
  return request({
    url: "/admin/login/config.html",
  });
}
// 退出
export function logoutApi() {
  return request({
    url: "/admin/login/logout",
  });
}
// 企业微信登录
// 跳转授权，二维码地址
export function qyvxUrlApi() {
  return request({
    url: "/qyvx/index/getAuthorizeUrl",
  });
}
// 授权登录
export function qyvxLoginApi() {
  return request({
    url: "/qyvx/index/login",
  });
}
// 企业微信应用回调地址，获取用户信息
export function verificationApi(code) {
  return request({
    url: "/qyvx/index/verification",
    method: "get",
    params: {
      code: code,
    },
  });
}
